//
//  YZMHistoryListViewController.m
//  YZMicroStock
//
//  Created by apple on 16/11/15.
//  Copyright © 2016年 cqjr. All rights reserved.
//

#import "YZMHistoryListViewController.h"
#import "YZMHistoryListView.h"

@interface YZMHistoryListViewController ()
@property(nonatomic, strong) YZMHistoryModel *model;
@property(nonatomic, strong) YZMHistoryListView *ListView;

@end

@implementation YZMHistoryListViewController

- (id)init {
    if (self = [super init]) {

        self.hidesBottomBarWhenPushed = YES;
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [YZMAppStyle appBackgroundColor];
    self.title = @"策略详情";
    [self createObject];
    // Do any additional setup after loading the view.
}

-(void)createObject
{
    self.ListView=[[YZMHistoryListView alloc]initWithFrame:self.view.frame style:UITableViewStylePlain];
    _ListView.model=self.model;
    [_ListView fetchSuggestionListFirstPage];
    [self.view addSubview:self.ListView];
}

#pragma mark - controller manager support

- (void)updateWithParams: (NSDictionary *)params
{
    self.model = params[@"model"];
}

+ (instancetype)createWithParams: (NSDictionary *)params
{
    YZMHistoryListViewController *ctrl = [[self alloc] init];
    [ctrl updateWithParams: params];
    return ctrl;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
